#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include <cstring>
using namespace std;
class Document
{
	char document[10];
public:
	Document(const char* p)
	{
		strcpy(document, p);
	}
	
	void setname(const char* p="***")
	{
		strcpy(document, p);
	}
	void PrintNameOf()
	{
		if (*document == 'D')
			cout << document << endl;
		else
			cout << "Name of book: " << document;
	}
};
class Book :public Document
{
	int num;
public:
	Book(const char* p = "***", int n = 0)
		:Document(p)
	{
		num = n;
	}
	
};
int main() {

	Document a("Document1");

	Book b("Book1", 100);

	a.PrintNameOf();

	b.PrintNameOf();

}